import React from 'react';
import { Redirect } from "react-router-dom";


import HKMine from "@/pages/mine";
import HKDiscover from "@/pages/discover";
import HKFriend from "@/pages/friend";

import HKRecommend from '../pages/discover/c-pages/recommend';
import HKRanking from '../pages/discover/c-pages/ranking';
import HKAlbum from '../pages/discover/c-pages/album';
import HKDjradio from '../pages/discover/c-pages/djradio';
import HKArtist from '../pages/discover/c-pages/artist';
import HKSongs from '../pages/discover/c-pages/songs';


const routes = [
    {
        path: "/",
        exact: true,
        render: () => (
            <Redirect to="/discover" />
        )
    },
    {
        path: "/discover",
        component: HKDiscover,
        routes: [
            {
                path: "/discover",
                exact: true,
                render: () => (
                    <Redirect to="/discover/recommend" />
                )
            },
            {
                path: "/discover/recommend",
                component: HKRecommend
            },
            {
                path: "/discover/ranking",
                component: HKRanking
            },
            {
                path: "/discover/album",
                component: HKAlbum
            },
            {
                path: "/discover/djradio",
                exact: true,
                component: HKDjradio
            },
            {
                path: "/discover/artist",
                component: HKArtist
            },
            {
                path: "/discover/songs",
                component: HKSongs
            }
        ]
    },
    {
        path: "/friend",
        component: HKFriend
    },
    {
        path: "/mine",
        component: HKMine
    },
];

export default routes